package com.yuezhi.consumer.Listener;

import com.yuezhi.consumer.constant.QueueConstant;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


@Component
public class HeaderReceiver {

    @RabbitListener(queues = QueueConstant.HEADER_QUEUE_ONE)
    public void handlerOne(byte[] msg) {
        System.out.println("HeaderReceiver[1]:《" +new String(msg , 0, msg.length) + "》");
    }

    @RabbitListener(queues = QueueConstant.HEADER_QUEUE_TWO)
    public void handlerTwo(byte[] msg)  {
        System.out.println("HeaderReceiver[2]:《" +new String(msg , 0, msg.length) + "》");
    }
}
